//使用Go自带的ReverseProxy实现
package main

import (
	"net/http"
	"net/http/httputil"
	"net/url"
)

var proxyUrl = "http:hedaodao:password@127.0.0.1:8000"

func main() {
	proxy, _ := url.Parse(proxyUrl)

	reverseProxy := httputil.NewSingleHostReverseProxy(proxy)
	http.ListenAndServe("127.0.0.1:8004", reverseProxy)

}
